1. Field of the Invention
The present invention relates generally to computer graphics drawing applications, and in particular, to a method, apparatus, and article of manufacture for automatically and dynamically adjusting a snap increment.
2. Description of the Related Art
When working in a drawing/drafting application (e.g., a computer aided design [CAD]), users often want to place or draw objects at specific locations or of specific sizes. To assist in such drawing/drafting, many applications provide and display a grid consisting of a network of uniformly spaced horizontal and perpendicular lines. Such applications may then provide for snapping that allows an object to be easily positioned in alignment with grid lines, guide lines, or another object, by causing it to automatically jump to an exact position when the user drags it to the proximity of the desired location. A snap can be associated with a grid such that when placing or drawing an object, the object/geometry snaps to a particular vertex of the grid, thereby creating lines/objects that are both in a desired direction (e.g., a geometrically straight line) and of a desired distance (e.g., by snapping in exact increments). However, setting up and working with the grid and snap is often a manual process. Further, when zooming in/and out of a drawing, the prior art fails to provide a mechanism for adjusting the snap. Such problems may be more easily understood with an explanation of prior art snapping methodologies.
Prior art applications currently provide a standard (default) snap distance or grid size, and allow users to set or adjust the snap distance to aid drawing and modifying designs with precision. Setting and modifying the snap setting is a manual process:                Users have no indication of the size of a design and what units the design is in while they are working on the model;        Depending on the size of a design the user must change the snap to an appropriate increment;        Depending on the unit system, inches or mm for example, the user must change the snap to an appropriate increment;        Depending on how far in or out a design is viewed (zoom factor), different snap values are appropriate; and        Users often need to leave the design window in order to simply view what the snap increment is.        
Manual changes to a snap increment requires that the user understand where the snap settings are stored, how to make changes, and to know what an appropriate snap value should be. For new users or occasional users this can be a difficult process. For experienced users this can take time and focus away from the primary task of creating or modifying the design.
To more fully understand grids and snapping, an example is useful. A designer/architect may be drawing a line that must be of a specific length (e.g., a house must be exactly 8.5 feet or an engine block for a car must be 36 inches or 45 mm). Accordingly, as a design and drawing is modified, a certain amount of precision and scale is required for the design to be accurate. Prior art techniques allow the user to set a grid snap that defines the grid and snap distance that allows the user to snap the line to a grid vertex thereby establishing a defined distance rather than a line being infinitely variable in length. For example, as a line is drawn, it snaps to an increment. If the increment is 1 inch, the line being drawn will have a length that progresses from 1 inch, to 2 inches, to 3 inches, etc., up to the desired amount.
Problems arise in the prior art when users are working in the same drawing at different levels of zoom. For example, users may often be working with one line that is 2 mm long (e.g., when working with a mobile phone circuit) and another line that is 2 miles long (e.g., when working with a construction site or satellite design). In such a situation, the user is required to change the snap settings often by zooming in, manually changing the grid snap (e.g., to mm), then zooming out and changing the grid snap once again (e.g., back to miles). Such prior art solutions force users to spend an inordinate amount of time configuring software options to obtain logical behavior for snapping at various levels of zoom. Further, when designers require accurate/exact measurements, the prior art forces users to undertake complex manual operations.
Some prior art methods may provide an adaptive grid that readjusts so that the grid is not overly dense when a user zooms in/out. However, what such a technology provides is merely a visual adjustment that refrains from drawing lines when the lines begin to blend together during a zoom operation (e.g., as the user zooms out, lines appear closer together and more dense). Further, such a prior art mechanism does not affect the snap distance previously established by the user. In this regard, even when the user zooms out, although the displayed grid may be rendered differently (e.g., by not displaying every third line or displaying less horizontal/perpendicular lines), the smaller unit used for the snapping is unchanged. Instead, the user must manually modify the snap to match up with the new grid spacing which further requires user knowledge of the exact grid spacing.
Alternative prior art systems may utilize legends, rulers, or scales to indicate the mapping/ratio between the distance in the drawing and a real world distance. A user may adjust a snap or grid value by modifying/dragging drag handles on the ruler/legend. In some embodiments, such legends/rulers/scales get smaller and smaller as the user zooms out. Alternatively, such a legend/ruler/scale may update with the zoom level. However, such an autoscaling legend/ruler/scale does not affect the user established grid/snap distance. Instead, the setting remains the same regardless of the level of zoom and the user is required to manually adjust the snap value if desired.
Alternative prior art systems provide for geographic mapping systems. Such systems allow the user to zoom in on a certain area of a map. However, such mapping systems merely load flat maps and provide the ability to zoom in and out. Mapping systems do not provide the ability for users to draw on the maps or snap when drawing a line or object. Further, such prior art methods merely load flat maps and are not working on the same drawing file.
Again, prior art systems fail to provide a mechanism that automatically and dynamically adjusts the snap/grid distance based on the user's desired work attributes. Instead, users are required to manually set a snap value through dialog boxes each time the user desires to change the snap distance. Accordingly, the user is required to move away from the designing area to change the snap distance. What is needed is an automated and efficient mechanism for adjusting the snap distance based on the user's desired viewing/work attributes in a dynamic manner.